//联合类型
let a: number | string | boolean;
a = false;
a = "flks"
a = 45646;
let arr1: number[] | string[];
arr1 = [1, 2, 3];
arr1 = ['a', 'b', 'c'];
let arr2: (number | string)[];
arr2 = [1, 2, 3];
arr2 = ['a', 'b', 'c'];
arr2 = ['a', 5, 8, 'c'];
function bar(a: number | boolean): number | string {
    if (a == 1) {
        return 123
    } else {
        return "123"
    }
}
type vType=number | string | boolean;
let b:vType;
b = false;
b = "flks"
b = 45646;
export default{};
